<template>
	<view class="page">
		<z-paging ref="paging" v-model="list" @query="queryList" :default-page-size="10">
			<view slot="top">
				<navBar title="打赏记录" bg="#FFF"></navBar>
			</view>
			<view class="container">
				<view class="list flex_r_between" v-for="(item,index) in list" :key="index">
					<view class="left flex_center">
						<view class="avatar">
							<image :src="item.avatar" mode="aspectFill"></image>
						</view>
						<view class="text">
							<view class="nickname flex_center">
								<text class="hidden">{{ item.nickname }}</text>
							</view>
							<view class="time flex_center">
								{{ item.create_time }}
							</view>
						</view>
					</view>
		
					<view class="right flex_center">
						<text>打赏</text>
						<i>{{ item.price }}</i>
						<text>元</text>
					</view>
				</view>
			</view>
		</z-paging>
	</view>
</template>

<script>
	import navBar from '@/compentents/navBar/navBar.vue'
	import empty from '@/compentents/empty/empty.vue'
	import HevuLoading from '@/components/hevu-loading/hevu-loading.vue';
	export default {
		data() {
			return {
				list: [],
				page: 1,
				total: 1,
				
				order_id: 0,
			}
		},
		components: {
			navBar,
			empty,
			HevuLoading,
		},
		methods: {
			queryList(pageNo, pageSize){
				this.$get('/order/getRewaryLog',{
					order_id: this.order_id
				}).then(res=>{
					this.$refs.paging.complete(res.data.data);
				});
			},
		},
		
		onLoad(option) {
			this.order_id = option.order_id;
		}
	}
</script>

<style lang="less" scoped>
	
	page {
		background: #FFF;
	}
	
	.container {
		padding: 32rpx;
		background: #FFF;
	}
	
	.list {
		margin-bottom: 32rpx;
	
		.left {
			flex: 1;
	
			.avatar {
				width: 112rpx;
				height: 112rpx;
				margin-right: 24rpx;
	
				image {
					width: 112rpx;
					height: 112rpx;
					background: #D8D8D8;
					border-radius: 56rpx;
				}
			}
	
			.text {
				.nickname {
					margin-bottom: 12rpx;
	
					text {
						font-weight: 500;
						font-size: 32rpx;
						color: #131313;
						max-width: 300rpx;
					}
	
					view {
						width: 72rpx;
						height: 40rpx;
						background: linear-gradient(124deg, #FFD038 0%, #FFA32B 40%, #FF6119 100%);
						border-radius: 24rpx;
						font-weight: 500;
						font-size: 24rpx;
						color: #FFFFFF;
						line-height: 40rpx;
						text-align: center;
						margin-left: 8rpx;
					}
				}
	
				.time {
					font-size: 24rpx;
					color: #666666;
				}
			}
		}
	
		.right {
			text {
				font-size: 28rpx;
				color: #333333;
				line-height: 32rpx;
			}
			
			i {
				color: #FD2A53;
				font-size: 28rpx;
				line-height: 32rpx;
				font-style: normal;
				margin: 0 6rpx;
			}
		}
	}
</style>
